<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.8.0">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="fengzhaoyang&#39;s blog">
  <meta name="keyword" content="hexo-theme, vuejs">
  
  <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
    电子支付平台表设计 | fzy-blog
    
  </title>
  <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">
  
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
  
  <script src="/js/qrious.js"></script>
  
  
  
  
    <!-- MathJax support START -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <!-- MathJax support END -->
  


</head>
<div class="wechat-share">
  <img src="/css/images/logo.png">
</div>
  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>fzy-blog</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link">Home</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">Tags</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">Archives</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/project/" class="item-link">Projects</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">About</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link">Home</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">Tags</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">Archives</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/project/" class="menu-link">Projects</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">About</a>
            
          </li>
        
      </ul>
    </div>
  </div>
</header>

    <div id="article-banner">
  <h2>电子支付平台表设计</h2>
  <p class="post-date">2019-05-24</p>
  <div class="arrow-down">
    <a href="javascript:;"></a>
  </div>
</div>
<main class="app-body flex-box">
  <!-- Article START -->
  <article class="post-article">
    <section class="markdown-content"><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_account</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">int</span>(<span class="number">11</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   account_no           <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   balance              <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   unbalance            <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   security_money       <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   total_income         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   total_expend         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   today_income         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   today_expend         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   account_type         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   sett_amount          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'资金账户表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_account_history</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">int</span>(<span class="number">11</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   account_no           <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   amount               <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   balance              <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   fund_direction       <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   is_allow_sett        <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   is_complete_sett     <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   request_no           <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_trx_no          <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   trx_type             <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   risk_day             <span class="built_in">int</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'资金账户流水表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_pay_product</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   product_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付产品编号'</span>,</span><br><span class="line">   product_name         <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付产品名称'</span>,</span><br><span class="line">   audit_status         <span class="built_in">varchar</span>(<span class="number">45</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'支付产品表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_pay_way</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'version'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'修改时间'</span>,</span><br><span class="line">   pay_way_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付方式编号'</span>,</span><br><span class="line">   pay_way_name         <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付方式名称'</span>,</span><br><span class="line">   pay_type_code        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付类型编号'</span>,</span><br><span class="line">   pay_type_name        <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付类型名称'</span>,</span><br><span class="line">   pay_product_code     <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付产品编号'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'状态(100:正常状态,101非正常状态)'</span>,</span><br><span class="line">   sorts                <span class="built_in">int</span> <span class="keyword">default</span> <span class="number">1000</span> <span class="keyword">comment</span> <span class="string">'排序(倒序排序,默认值1000)'</span>,</span><br><span class="line">   pay_rate             <span class="keyword">double</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户支付费率'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'支付方式'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_sett_daily_collect</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'版本号'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'修改时间'</span>,</span><br><span class="line">   account_no           <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'账户编号'</span>,</span><br><span class="line">   user_name            <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'用户姓名'</span>,</span><br><span class="line">   collect_date         <span class="built_in">date</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'汇总日期'</span>,</span><br><span class="line">   collect_type         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'汇总类型(参考枚举:settdailycollecttypeenum)'</span>,</span><br><span class="line">   total_amount         <span class="built_in">decimal</span>(<span class="number">24</span>,<span class="number">10</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'交易总金额'</span>,</span><br><span class="line">   total_count          <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'交易总笔数'</span>,</span><br><span class="line">   sett_status          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'结算状态(参考枚举:settdailycollectstatusenum)'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">300</span>) <span class="keyword">comment</span> <span class="string">'备注'</span>,</span><br><span class="line">   risk_day             <span class="built_in">int</span> <span class="keyword">comment</span> <span class="string">'风险预存期天数'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'每日待结算汇总'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_sett_record</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'版本号'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'修改时间'</span>,</span><br><span class="line">   sett_mode            <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'结算发起方式(参考settmodetypeenum)'</span>,</span><br><span class="line">   account_no           <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'账户编号'</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">comment</span> <span class="string">'用户编号'</span>,</span><br><span class="line">   user_name            <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'用户姓名'</span>,</span><br><span class="line">   user_type            <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'用户类型'</span>,</span><br><span class="line">   sett_date            <span class="built_in">date</span> <span class="keyword">comment</span> <span class="string">'结算日期'</span>,</span><br><span class="line">   bank_code            <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">comment</span> <span class="string">'银行编码'</span>,</span><br><span class="line">   bank_name            <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'银行名称'</span>,</span><br><span class="line">   bank_account_name    <span class="built_in">varchar</span>(<span class="number">60</span>) <span class="keyword">comment</span> <span class="string">'开户名'</span>,</span><br><span class="line">   bank_account_no      <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">comment</span> <span class="string">'开户账户'</span>,</span><br><span class="line">   bank_account_type    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'开户账户'</span>,</span><br><span class="line">   country              <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'开户行所在国家'</span>,</span><br><span class="line">   province             <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'开户行所在省份'</span>,</span><br><span class="line">   city                 <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'开户行所在城市'</span>,</span><br><span class="line">   areas                <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'开户行所在区'</span>,</span><br><span class="line">   bank_account_address <span class="built_in">varchar</span>(<span class="number">300</span>) <span class="keyword">comment</span> <span class="string">'开户行全称'</span>,</span><br><span class="line">   mobile_no            <span class="built_in">varchar</span>(<span class="number">20</span>) <span class="keyword">comment</span> <span class="string">'收款人手机号'</span>,</span><br><span class="line">   sett_amount          <span class="built_in">decimal</span>(<span class="number">24</span>,<span class="number">10</span>) <span class="keyword">comment</span> <span class="string">'结算金额'</span>,</span><br><span class="line">   sett_fee             <span class="built_in">decimal</span>(<span class="number">16</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'结算手续费'</span>,</span><br><span class="line">   remit_amount         <span class="built_in">decimal</span>(<span class="number">16</span>,<span class="number">2</span>) <span class="keyword">comment</span> <span class="string">'结算打款金额'</span>,</span><br><span class="line">   sett_status          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'结算状态(参考枚举:settrecordstatusenum)'</span>,</span><br><span class="line">   remit_confirm_time   datetime <span class="keyword">comment</span> <span class="string">'打款确认时间'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'描述'</span>,</span><br><span class="line">   remit_remark         <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'打款备注'</span>,</span><br><span class="line">   operator_loginname   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'操作员登录名'</span>,</span><br><span class="line">   operator_realname    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'操作员姓名'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'结算记录'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_sett_record_annex</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   is_delete            <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   annex_name           <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   annex_address        <span class="built_in">varchar</span>(<span class="number">500</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   settlement_id        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">);</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_user_bank_account</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_name            <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_code            <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_account_name    <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_account_no      <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   card_type            <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   card_no              <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   mobile_no            <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   is_default           <span class="built_in">varchar</span>(<span class="number">36</span>),</span><br><span class="line">   province             <span class="built_in">varchar</span>(<span class="number">20</span>),</span><br><span class="line">   city                 <span class="built_in">varchar</span>(<span class="number">20</span>),</span><br><span class="line">   areas                <span class="built_in">varchar</span>(<span class="number">20</span>),</span><br><span class="line">   street               <span class="built_in">varchar</span>(<span class="number">300</span>),</span><br><span class="line">   bank_account_type    <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'用户银行账户表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_user_info</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   user_name            <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   account_no           <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   mobile <span class="built_in">varchar</span>(<span class="number">15</span>);</span><br><span class="line">   password varchar(50);</span><br><span class="line">   pay_pwd varchar(50) <span class="keyword">comment</span> <span class="string">'支付密码'</span> <span class="keyword">default</span> <span class="string">'123456'</span>;</span><br><span class="line">   primary key (id),</span><br><span class="line">   unique key ak_key_2 (account_no)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'该表用来存放用户的基本信息'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_user_pay_config</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   audit_status         <span class="built_in">varchar</span>(<span class="number">45</span>),</span><br><span class="line">   is_auto_sett         <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="string">'no'</span>,</span><br><span class="line">   product_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付产品编号'</span>,</span><br><span class="line">   product_name         <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付产品名称'</span>,</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   user_name            <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   risk_day             <span class="built_in">int</span>,</span><br><span class="line">   pay_key              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   fund_into_type       <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   pay_secret           <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   security_rating <span class="built_in">varchar</span>(<span class="number">20</span>)  <span class="keyword">comment</span> <span class="string">'安全等级'</span> <span class="keyword">default</span> <span class="string">'MD5'</span>;</span><br><span class="line">   merchant_server_ip varchar(200) <span class="keyword">comment</span> <span class="string">'商户服务器IP'</span>;</span><br><span class="line">   primary key (id)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'支付设置表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_user_pay_info</span><br><span class="line">(</span><br><span class="line">   id_                  <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   edit_time            datetime,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">bigint</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>),</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">36</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   app_id               <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   app_sectet           <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   merchant_id          <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   app_type             <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   user_no              <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   user_name            <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   partner_key          <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   pay_way_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付方式编号'</span>,</span><br><span class="line">   pay_way_name         <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付方式名称'</span>,</span><br><span class="line">   offline_app_id <span class="built_in">varchar</span>(<span class="number">50</span>);</span><br><span class="line">   rsa_private_key varchar(100);</span><br><span class="line">   rsa_public_key varchar(100);</span><br><span class="line">   primary key (id_)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'该表用来存放用户开通的第三方支付信息'</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_account_check_batch</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">unsigned</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   batch_no             <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bill_date            <span class="built_in">date</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bill_type            <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   handle_status        <span class="built_in">varchar</span>(<span class="number">10</span>),</span><br><span class="line">   bank_type            <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   mistake_count        <span class="built_in">int</span>(<span class="number">8</span>),</span><br><span class="line">   unhandle_mistake_count <span class="built_in">int</span>(<span class="number">8</span>),</span><br><span class="line">   trade_count          <span class="built_in">int</span>(<span class="number">8</span>),</span><br><span class="line">   bank_trade_count     <span class="built_in">int</span>(<span class="number">8</span>),</span><br><span class="line">   trade_amount         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_trade_amount    <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   refund_amount        <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_refund_amount   <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_fee             <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   org_check_file_path  <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   release_check_file_path <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   release_status       <span class="built_in">varchar</span>(<span class="number">15</span>),</span><br><span class="line">   check_fail_msg       <span class="built_in">varchar</span>(<span class="number">300</span>),</span><br><span class="line">   bank_err_msg         <span class="built_in">varchar</span>(<span class="number">300</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'对账批次表 rp_account_check_batch'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_account_check_mistake</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">unsigned</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   account_check_batch_no <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bill_date            <span class="built_in">date</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   bank_type            <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   order_time           datetime,</span><br><span class="line">   merchant_name        <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   order_no             <span class="built_in">varchar</span>(<span class="number">40</span>),</span><br><span class="line">   trade_time           datetime,</span><br><span class="line">   trx_no               <span class="built_in">varchar</span>(<span class="number">20</span>),</span><br><span class="line">   order_amount         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   refund_amount        <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   trade_status         <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   fee                  <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_trade_time      datetime,</span><br><span class="line">   bank_order_no        <span class="built_in">varchar</span>(<span class="number">40</span>),</span><br><span class="line">   bank_trx_no          <span class="built_in">varchar</span>(<span class="number">40</span>),</span><br><span class="line">   bank_trade_status    <span class="built_in">varchar</span>(<span class="number">30</span>),</span><br><span class="line">   bank_amount          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_refund_amount   <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   bank_fee             <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>),</span><br><span class="line">   err_type             <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   handle_status        <span class="built_in">varchar</span>(<span class="number">10</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   handle_value         <span class="built_in">varchar</span>(<span class="number">1000</span>),</span><br><span class="line">   handle_remark        <span class="built_in">varchar</span>(<span class="number">1000</span>),</span><br><span class="line">   operator_name        <span class="built_in">varchar</span>(<span class="number">100</span>),</span><br><span class="line">   operator_account_no  <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'对账差错表 rp_account_check_mistake'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_account_check_mistake_scratch_pool</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">unsigned</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   product_name         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'商品名称'</span>,</span><br><span class="line">   merchant_order_no    <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户订单号'</span>,</span><br><span class="line">   trx_no               <span class="built_in">char</span>(<span class="number">20</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付流水号'</span>,</span><br><span class="line">   bank_order_no        <span class="built_in">char</span>(<span class="number">20</span>) <span class="keyword">comment</span> <span class="string">'银行订单号'</span>,</span><br><span class="line">   bank_trx_no          <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'银行流水号'</span>,</span><br><span class="line">   order_amount         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'订单金额'</span>,</span><br><span class="line">   plat_income          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台收入'</span>,</span><br><span class="line">   fee_rate             <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'费率'</span>,</span><br><span class="line">   plat_cost            <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台成本'</span>,</span><br><span class="line">   plat_profit          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台利润'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'状态(参考枚举:paymentrecordstatusenum)'</span>,</span><br><span class="line">   pay_way_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付通道编号'</span>,</span><br><span class="line">   pay_way_name         <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'支付通道名称'</span>,</span><br><span class="line">   pay_success_time     datetime <span class="keyword">comment</span> <span class="string">'支付成功时间'</span>,</span><br><span class="line">   complete_time        datetime <span class="keyword">comment</span> <span class="string">'完成时间'</span>,</span><br><span class="line">   is_refund            <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">default</span> <span class="string">'101'</span> <span class="keyword">comment</span> <span class="string">'是否退款(100:是,101:否,默认值为:101)'</span>,</span><br><span class="line">   refund_times         <span class="built_in">smallint</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'退款次数(默认值为:0)'</span>,</span><br><span class="line">   success_refund_amount <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'成功退款总金额'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">500</span>) <span class="keyword">comment</span> <span class="string">'备注'</span>,</span><br><span class="line">   batch_no             <span class="built_in">varchar</span>(<span class="number">50</span>),</span><br><span class="line">   bill_date            datetime</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'差错暂存池'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_notify_record</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   notify_times         <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   limit_notify_times   <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">url</span>                  <span class="built_in">varchar</span>(<span class="number">2000</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   merchant_order_no    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'100:成功 101:失败'</span>,</span><br><span class="line">   notify_type          <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'通知类型'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>),</span><br><span class="line">   <span class="keyword">key</span> ak_key_2 (merchant_order_no)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'通知记录表 rp_notify_record'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_notify_record_log</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   notify_id            <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   request              <span class="built_in">varchar</span>(<span class="number">2000</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   response             <span class="built_in">varchar</span>(<span class="number">2000</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span>,</span><br><span class="line">   merchant_order_no    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户订单号'</span>,</span><br><span class="line">   http_status          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'http状态'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'通知记录日志表 rp_notify_record_log'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_refund_record</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'版本号'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   org_merchant_order_no <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'原商户订单号'</span>,</span><br><span class="line">   org_trx_no           <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'原支付流水号'</span>,</span><br><span class="line">   org_bank_order_no    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'原银行订单号'</span>,</span><br><span class="line">   org_bank_trx_no      <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'原银行流水号'</span>,</span><br><span class="line">   merchant_name        <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'商家名称'</span>,</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商家编号'</span>,</span><br><span class="line">   org_product_name     <span class="built_in">varchar</span>(<span class="number">60</span>) <span class="keyword">comment</span> <span class="string">'原商品名称'</span>,</span><br><span class="line">   org_biz_type         <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'原业务类型'</span>,</span><br><span class="line">   org_payment_type     <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'原支付方式类型'</span>,</span><br><span class="line">   refund_amount        <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'订单退款金额'</span>,</span><br><span class="line">   refund_trx_no        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'退款流水号'</span>,</span><br><span class="line">   refund_order_no      <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'退款订单号'</span>,</span><br><span class="line">   bank_refund_order_no <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'银行退款订单号'</span>,</span><br><span class="line">   bank_refund_trx_no   <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'银行退款流水号'</span>,</span><br><span class="line">   result_notify_url    <span class="built_in">varchar</span>(<span class="number">500</span>) <span class="keyword">comment</span> <span class="string">'退款结果通知url'</span>,</span><br><span class="line">   refund_status        <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'退款状态'</span>,</span><br><span class="line">   refund_from          <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'退款来源（分发平台）'</span>,</span><br><span class="line">   refund_way           <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'退款方式'</span>,</span><br><span class="line">   refund_request_time  datetime <span class="keyword">comment</span> <span class="string">'退款请求时间'</span>,</span><br><span class="line">   refund_success_time  datetime <span class="keyword">comment</span> <span class="string">' 退款成功时间'</span>,</span><br><span class="line">   refund_complete_time datetime <span class="keyword">comment</span> <span class="string">'退款完成时间'</span>,</span><br><span class="line">   request_apply_user_id <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'退款请求,申请人登录名'</span>,</span><br><span class="line">   request_apply_user_name <span class="built_in">varchar</span>(<span class="number">90</span>) <span class="keyword">comment</span> <span class="string">'退款请求,申请人姓名'</span>,</span><br><span class="line">   refund_reason        <span class="built_in">varchar</span>(<span class="number">500</span>) <span class="keyword">comment</span> <span class="string">'退款原因'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">3000</span>) <span class="keyword">comment</span> <span class="string">'备注'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>),</span><br><span class="line">   <span class="keyword">unique</span> <span class="keyword">key</span> ak_key_2 (refund_trx_no)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'退款记录表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_trade_payment_order</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'版本号'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'状态(参考枚举:orderstatusenum)'</span>,</span><br><span class="line">   product_name         <span class="built_in">varchar</span>(<span class="number">300</span>) <span class="keyword">comment</span> <span class="string">'商品名称'</span>,</span><br><span class="line">   merchant_order_no    <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户订单号'</span>,</span><br><span class="line">   order_amount         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'订单金额'</span>,</span><br><span class="line">   order_from           <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'订单来源'</span>,</span><br><span class="line">   merchant_name        <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'商家名称'</span>,</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户编号'</span>,</span><br><span class="line">   order_time           datetime <span class="keyword">comment</span> <span class="string">'下单时间'</span>,</span><br><span class="line">   order_date           <span class="built_in">date</span> <span class="keyword">comment</span> <span class="string">'下单日期'</span>,</span><br><span class="line">   order_ip             <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'下单ip(客户端ip,在网关页面获取)'</span>,</span><br><span class="line">   order_referer_url    <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'从哪个页面链接过来的(可用于防诈骗)'</span>,</span><br><span class="line">   return_url           <span class="built_in">varchar</span>(<span class="number">600</span>) <span class="keyword">comment</span> <span class="string">'页面回调通知url'</span>,</span><br><span class="line">   notify_url           <span class="built_in">varchar</span>(<span class="number">600</span>) <span class="keyword">comment</span> <span class="string">'后台异步通知url'</span>,</span><br><span class="line">   cancel_reason        <span class="built_in">varchar</span>(<span class="number">600</span>) <span class="keyword">comment</span> <span class="string">'订单撤销原因'</span>,</span><br><span class="line">   order_period         <span class="built_in">smallint</span> <span class="keyword">comment</span> <span class="string">'订单有效期(单位分钟)'</span>,</span><br><span class="line">   expire_time          datetime <span class="keyword">comment</span> <span class="string">'到期时间'</span>,</span><br><span class="line">   pay_way_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付方式编号'</span>,</span><br><span class="line">   pay_way_name         <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'支付方式名称'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">200</span>) <span class="keyword">comment</span> <span class="string">'支付备注'</span>,</span><br><span class="line">   trx_type             <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'交易业务类型  ：消费、充值等'</span>,</span><br><span class="line">   trx_no               <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付流水号'</span>,</span><br><span class="line">   pay_type_code        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付类型编号'</span>,</span><br><span class="line">   pay_type_name        <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'支付类型名称'</span>,</span><br><span class="line">   fund_into_type       <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'资金流入类型'</span>,</span><br><span class="line">   is_refund            <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">default</span> <span class="string">'101'</span> <span class="keyword">comment</span> <span class="string">'是否退款(100:是,101:否,默认值为:101)'</span>,</span><br><span class="line">   refund_times         <span class="built_in">int</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'退款次数(默认值为:0)'</span>,</span><br><span class="line">   success_refund_amount <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'成功退款总金额'</span>,</span><br><span class="line">   field1               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field2               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field3               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field4               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field5               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>),</span><br><span class="line">   <span class="keyword">unique</span> <span class="keyword">key</span> ak_key_2 (merchant_order_no, merchant_no)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'roncoo pay 龙果支付 支付订单表'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> rp_trade_payment_record</span><br><span class="line">(</span><br><span class="line">   <span class="keyword">id</span>                   <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'id'</span>,</span><br><span class="line">   <span class="keyword">version</span>              <span class="built_in">int</span> <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'版本号'</span>,</span><br><span class="line">   create_time          datetime <span class="keyword">comment</span> <span class="string">'创建时间'</span>,</span><br><span class="line">   <span class="keyword">status</span>               <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'状态(参考枚举:paymentrecordstatusenum)'</span>,</span><br><span class="line">   editor               <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'修改者'</span>,</span><br><span class="line">   creater              <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'创建者'</span>,</span><br><span class="line">   edit_time            datetime <span class="keyword">comment</span> <span class="string">'最后修改时间'</span>,</span><br><span class="line">   product_name         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'商品名称'</span>,</span><br><span class="line">   merchant_order_no    <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商户订单号'</span>,</span><br><span class="line">   trx_no               <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'支付流水号'</span>,</span><br><span class="line">   bank_order_no        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'银行订单号'</span>,</span><br><span class="line">   bank_trx_no          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'银行流水号'</span>,</span><br><span class="line">   merchant_name        <span class="built_in">varchar</span>(<span class="number">300</span>) <span class="keyword">comment</span> <span class="string">'商家名称'</span>,</span><br><span class="line">   merchant_no          <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">not</span> <span class="literal">null</span> <span class="keyword">comment</span> <span class="string">'商家编号'</span>,</span><br><span class="line">   payer_user_no        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'付款人编号'</span>,</span><br><span class="line">   payer_name           <span class="built_in">varchar</span>(<span class="number">60</span>) <span class="keyword">comment</span> <span class="string">'付款人名称'</span>,</span><br><span class="line">   payer_pay_amount     <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'付款方支付金额'</span>,</span><br><span class="line">   payer_fee            <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'付款方手续费'</span>,</span><br><span class="line">   payer_account_type   <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'付款方账户类型(参考账户类型枚举:accounttypeenum)'</span>,</span><br><span class="line">   receiver_user_no     <span class="built_in">varchar</span>(<span class="number">15</span>) <span class="keyword">comment</span> <span class="string">'收款人编号'</span>,</span><br><span class="line">   receiver_name        <span class="built_in">varchar</span>(<span class="number">60</span>) <span class="keyword">comment</span> <span class="string">'收款人名称'</span>,</span><br><span class="line">   receiver_pay_amount  <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'收款方支付金额'</span>,</span><br><span class="line">   receiver_fee         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'收款方手续费'</span>,</span><br><span class="line">   receiver_account_type <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'收款方账户类型(参考账户类型枚举:accounttypeenum)'</span>,</span><br><span class="line">   order_ip             <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'下单ip(客户端ip,从网关中获取)'</span>,</span><br><span class="line">   order_referer_url    <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'从哪个页面链接过来的(可用于防诈骗)'</span>,</span><br><span class="line">   order_amount         <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'订单金额'</span>,</span><br><span class="line">   plat_income          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台收入'</span>,</span><br><span class="line">   fee_rate             <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'费率'</span>,</span><br><span class="line">   plat_cost            <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台成本'</span>,</span><br><span class="line">   plat_profit          <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'平台利润'</span>,</span><br><span class="line">   return_url           <span class="built_in">varchar</span>(<span class="number">600</span>) <span class="keyword">comment</span> <span class="string">'页面回调通知url'</span>,</span><br><span class="line">   notify_url           <span class="built_in">varchar</span>(<span class="number">600</span>) <span class="keyword">comment</span> <span class="string">'后台异步通知url'</span>,</span><br><span class="line">   pay_way_code         <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付方式编号'</span>,</span><br><span class="line">   pay_way_name         <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'支付方式名称'</span>,</span><br><span class="line">   pay_success_time     datetime <span class="keyword">comment</span> <span class="string">'支付成功时间'</span>,</span><br><span class="line">   complete_time        datetime <span class="keyword">comment</span> <span class="string">'完成时间'</span>,</span><br><span class="line">   is_refund            <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">default</span> <span class="string">'101'</span> <span class="keyword">comment</span> <span class="string">'是否退款(100:是,101:否,默认值为:101)'</span>,</span><br><span class="line">   refund_times         <span class="built_in">int</span> <span class="keyword">default</span> <span class="number">0</span> <span class="keyword">comment</span> <span class="string">'退款次数(默认值为:0)'</span>,</span><br><span class="line">   success_refund_amount <span class="built_in">decimal</span>(<span class="number">20</span>,<span class="number">6</span>) <span class="keyword">comment</span> <span class="string">'成功退款总金额'</span>,</span><br><span class="line">   trx_type             <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'交易业务类型  ：消费、充值等'</span>,</span><br><span class="line">   order_from           <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'订单来源'</span>,</span><br><span class="line">   pay_type_code        <span class="built_in">varchar</span>(<span class="number">50</span>) <span class="keyword">comment</span> <span class="string">'支付类型编号'</span>,</span><br><span class="line">   pay_type_name        <span class="built_in">varchar</span>(<span class="number">100</span>) <span class="keyword">comment</span> <span class="string">'支付类型名称'</span>,</span><br><span class="line">   fund_into_type       <span class="built_in">varchar</span>(<span class="number">30</span>) <span class="keyword">comment</span> <span class="string">'资金流入类型'</span>,</span><br><span class="line">   remark               <span class="built_in">varchar</span>(<span class="number">3000</span>) <span class="keyword">comment</span> <span class="string">'备注'</span>,</span><br><span class="line">   field1               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field2               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field3               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field4               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   field5               <span class="built_in">varchar</span>(<span class="number">500</span>),</span><br><span class="line">   bank_return_msg      <span class="built_in">varchar</span>(<span class="number">2000</span>) <span class="keyword">comment</span> <span class="string">'银行返回信息'</span>,</span><br><span class="line">   primary <span class="keyword">key</span> (<span class="keyword">id</span>),</span><br><span class="line">   <span class="keyword">unique</span> <span class="keyword">key</span> ak_key_2 (trx_no)</span><br><span class="line">) <span class="keyword">comment</span> <span class="string">'支付记录表'</span>;</span><br></pre></td></tr></table></figure>
</section>
    <!-- Tags START -->
    
    <div class="tags">
      <span>Tags:</span>
      
  <a href="/tags#分布式微服务架构">
    <span class="tag-code">分布式微服务架构</span>
  </a>

    </div>
    
    <!-- Tags END -->
    <!-- NAV START -->
    
  <div class="nav-container">
    <!-- reverse left and right to put prev and next in a more logic postition -->
    
      <a class="nav-left" href="/2019/05/24/分布式微服务架构/电子商务平台表设计/">
        <span class="nav-arrow">← </span>
        
          电子商务平台表设计
        
      </a>
    
    
      <a class="nav-right" href="/2019/05/24/分布式微服务架构/电子商务系统的设计与实现：数据库设计/">
        
          电子商务系统的设计与实现：数据库设计
        
        <span class="nav-arrow"> →</span>
      </a>
    
  </div>

    <!-- NAV END -->
    <!-- 打赏 START -->
    
    <div class="money-like">
      <div class="reward-btn">
        赏
        <span class="money-code">
          <span class="alipay-code">
            <div class="code-image"></div>
            <b>使用支付宝打赏</b>
          </span>
          <span class="wechat-code">
            <div class="code-image"></div>
            <b>使用微信打赏</b>
          </span>
        </span>
      </div>
      <p class="notice">若你觉得我的文章对你有帮助，欢迎点击上方按钮对我打赏</p>
    </div>
    
    <!-- 打赏 END -->
    <!-- 二维码 START -->
    
    <div class="qrcode">
      <canvas id="share-qrcode"></canvas>
      <p class="notice">扫描二维码，分享此文章</p>
    </div>
    
    <!-- 二维码 END -->
    
    <!-- No Comment -->
    
  </article>
  <!-- Article END -->
  <!-- Catalog START -->
  
  <aside class="catalog-container">
  <div class="toc-main">
    <strong class="toc-title">Catalog</strong>
    
      <ol class="nav">none</ol>
    
  </div>
</aside>
  
  <!-- Catalog END -->
</main>

<script>
  (function () {
    var url = 'https://fengzhaoy.github.io/2019/05/24/分布式微服务架构/电子支付平台表设计/';
    var banner = ''
    if (banner !== '' && banner !== 'undefined' && banner !== 'null') {
      $('#article-banner').css({
        'background-image': 'url(' + banner + ')'
      })
    } else {
      $('#article-banner').geopattern(url)
    }
    $('.header').removeClass('fixed-header')

    // error image
    $(".markdown-content img").on('error', function () {
      $(this).attr('src', 'http://file.muyutech.com/error-img.png')
      $(this).css({
        'cursor': 'default'
      })
    })

    // zoom image
    $(".markdown-content img").on('click', function () {
      var src = $(this).attr('src')
      if (src !== 'http://file.muyutech.com/error-img.png') {
        var imageW = $(this).width()
        var imageH = $(this).height()

        var zoom = ($(window).width() * 0.95 / imageW).toFixed(2)
        zoom = zoom < 1 ? 1 : zoom
        zoom = zoom > 2 ? 2 : zoom
        var transY = (($(window).height() - imageH) / 2).toFixed(2)

        $('body').append('<div class="image-view-wrap"><div class="image-view-inner"><img src="' + src +
          '" /></div></div>')
        $('.image-view-wrap').addClass('wrap-active')
        $('.image-view-wrap img').css({
          'width': `${imageW}`,
          'transform': `translate3d(0, ${transY}px, 0) scale3d(${zoom}, ${zoom}, 1)`
        })
        $('html').css('overflow', 'hidden')

        $('.image-view-wrap').on('click', function () {
          $(this).remove()
          $('html').attr('style', '')
        })
      }
    })
  })();
</script>


<script>
  var qr = new QRious({
    element: document.getElementById('share-qrcode'),
    value: document.location.href
  });
</script>





    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
  <p class="copyright">
    &copy; 2019
  </p>
</footer>

<script>
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function (e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async ("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function () {
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async ("//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function () {
    $('figure pre').each(function (i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>
<!-- Baidu Tongji -->

<script src="/js/script.js"></script>
  </body>
</html>